package main
import "fmt"

func main(){
	str := "Go is a beautiful language!"
	str2:= "Chinese: 汉语"

	fmt.Printf("The length of str is: %d\n", len(str))
	for pos, char := range str{
		fmt.Printf("Characte on position %d is: %c\n", pos, char)
	}
	fmt.Printf("The length of str2 is: %d\n", len(str2))
	for pos, _ := range str2{
		fmt.Printf("Characte on position %d is: %c\n", pos, str2[pos])
	}

	fmt.Println()
	fmt.Println("index int(rune) rune    char bytes")
	for index, rune := range str2{
		fmt.Printf("%-2d    %d    %U  '%c' %X\n", index, rune, rune, rune, []byte(string(rune)))
	}
}
